-- GENERATED SPELL FOR [Hoary Templar] --


function spell0_15212(pUnit, Event) --@Elemental Spawn-in,Self--
pUnit:FullCastSpellOnTarget(25035,pUnit)
pUnit:RegisterEvent('Sorts_15212', 612, 1)
end

function spell1_15212(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(19514,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15212', 0, 1)
end

function Sorts_15212(pUnit, Event)
local choix_sorts_15212 = math.random(0, 1)
if choix_sorts_15212 == 0 then
pUnit:RegisterEvent('spell0_15212', 1, 1)
end
if choix_sorts_15212 == 1 then
pUnit:RegisterEvent('spell1_15212', 1, 1)
end
end

function mob15212_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15212', math.random(1500, 3000), 1)
end

function mob15212_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15212_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15212_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15212, 1, 'mob15212_Action')
RegisterUnitEvent(15212, 2, 'mob15212_Leave')
RegisterUnitEvent(15212, 3, 'mob15212_Kill')
RegisterUnitEvent(15212, 4, 'mob15212_Die')
